﻿@model myMvcBlog.Post
@{
	ViewBag.Title = Model.Name;
}
<style type="text/css">
	.addthis_toolbox
	{
		height: 40px !important;
		margin-top: 10px;
	}
</style>
<div class="post">
	<h2>
		@Html.ActionLink(Model.Name, "View", new { nicename = Model.UrlName })
	</h2>
	<small>@Model.PostedTime</small>
	<div class="entry">
		<p>
			@Html.Raw(Model.Content)
		</p>
	</div>
	<!-- AddThis Button BEGIN -->
	<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
		<a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_email">
		</a><a class="addthis_button_print"></a><a class="addthis_button_compact"></a>
	</div>
	<ul class="postmetadata">
		<li class="icon_comment icon_r">
			@Html.ActionLink(Model.Comments.Count() + " comments", "View", "Home", new { nicename = Model.UrlName })
		</li>
		<li class="icon_cat"><strong>Category:</strong>
			@foreach (var postCategory in Model.PostCategories)
			{
				var category = postCategory.Categories.ToList()[0];
				@Html.ActionLink(category.Name, "View", new
				   {
					   controller = "Category",
					   nicename = category.UrlName
				   });

			}
		</li>
		<li class="icon_tag"><strong>Tags:</strong>
			@foreach (var postTag in Model.PostTags)
			{
				var tag = postTag.Tags.ToList()[0];
				@Html.ActionLink(tag.Name + ", ", "View", new { controller = "Tag", nicename = tag.UrlName });
			}
		</li>
	</ul>
</div>
<p>
<div id="disqus_thread"></div>
<script type="text/javascript">
	/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
	var disqus_shortname = 'mymvcblog'; // required: replace example with your forum shortname

	// The following are highly recommended additional parameters. Remove the slashes in front to use.
	//var disqus_identifier = 'unique_dynamic_id_1234';
	//var disqus_url = 'http://example.com/permalink-to-page.html';

	/* * * DON'T EDIT BELOW THIS LINE * * */
	(function () {
		var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
		dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
</p>
<script type="text/javascript">    var addthis_config = { "data_track_clickback": true };</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=jun1st"></script>
